// 你好，世界
console.log('Hello World')

// function greet(person: string, date: string): void
// function greet(person: string, date: string): void {
function greet (person, date) {
  console.log(`Hello ${person}, today is ${date}`)
}
greet('小明', '星期一')
// greet 函数会报错：Duplicate function implementation. 函数实现重复。
// 解决办法，tsc --init 生成配置文件 tsconfig.json，将严格模式字段修改 false 或注释

function greet1 (person: string, date: Date) {
  // console.log(`Hello ${person}, today is ${date}`) // Sat Apr 02 2022 11:18:12 GMT+0800 (中国标准时间)
  console.log(`Hello ${person}, today is ${date.toDateString()}`) //  Sat Apr 02 2022
}
greet1('小明', new Date())
